package com.kaibes.module.email.sender;

import org.springframework.stereotype.Service;

import com.kaibes.orm.curd.QueryBuilder;
import com.kaibes.web.api.ResponseServiceImpl;

@Service
public class MailTemplateService extends ResponseServiceImpl<MailTemplate> {

    public int updateByKey(Object e, String key) {
        return update(e, QueryBuilder.newBuilder().eq("key", key).build());
    }
    
    public MailTemplate getByKey(String key) {
        return get(QueryBuilder.newBuilder().eq("key", key).build());
    }
    
    public int removeByKey(String key) {
        return remove(QueryBuilder.newBuilder().eq("key", key).build());
    }
    
}
